Mobile processor-based systems such as laptop computers and handheld computers, and other processor-based devices such as mobile phones and game consoles, can offer improved power performance using a processor (“CPU”) speed governor or CPU frequency governor. In a typical situation, CPUs such as Intel Pentium® M, Intel Core®, Core Duo® and Core 2 Duo® with Intel SpeedStep® technology have a frequency governor that may be controlled by an operating system (“OS”). Automatic CPU frequency governors are typically software components within the OS that optimize the platform's power/performance by automatically scaling the CPU frequency and/or voltage based on CPU load. In one mode of operation, an automatic configuration of the frequency governor raises or lowers the clock frequency at which the CPU operates based on a recently sampled level of utilization of the CPU. Typically, the governor analyzes CPU utilization at regular intervals, such as 250 ms, dropping the frequency in response to high-idle periods, and raising it in response to high-utilization periods. CPU utilization is typically calculated by detecting if the CPU is halted when a periodic timer interrupt on the platform is fired. Thus, for example, if the timer interrupt fires 1000 times per second and in the last 1/10 of a second, the CPU was halted 40 of 100 times when the timer interrupt fired, the OS may calculate a CPU “load” of 60%.
FIG. 1 is a graph illustrating CPU utilization when a program is executed on an ungoverned system (shown at 140) and, superimposed on the graph is a typical response of a frequency governor to the execution of the program on a governed system, (shown at 120). As may be seen from the figure, this method provides a coarse relationship between CPU frequency and the capacity required by the programs executing on the system. Because the frequency governor lags the actual behavior of the program and because the changes in frequency therefore only occur at relatively large intervals, the actual frequency may lag the required capacity significantly. As the figure illustrates, a quick increase in utilization may only be met with a corresponding increase in frequency after a substantial interval has already elapsed and the CPU needs of the program have started to fall, 160. Alternatively, the CPU frequency may stay high, unnecessarily draining power, long after the need for high CPU capacity has already fallen off, 180.
In order to improve battery life, it is generally considered advantageous for a frequency governor to lower CPU frequency and voltage to the minimal available frequency level that exceeds the frequency required to prevent CPU saturation. In an ideal scenario, this would be possible if the future CPU utilization of the system were known. In general, however, for an arbitrary program executing on a CPU-based system, predicting the expected utilization of the CPU for the execution of the program is difficult or infeasible, because the past performance of an application is not always a good indicator future demand. This may happen, at least in part, because CPU utilization depends on the inputs to an executing program and for many executing programs, the future values of input data are unpredictable.